package com.chinasoft.mall.model.response;

import java.io.Serializable;

import com.chinasoft.mall.util.DateUtil;

public class EpgBean extends BaseResponse implements Serializable,
		Comparable<EpgBean> {
	private static final long serialVersionUID = 5295165330725643981L;
	private String FORM_ID;
	private String FORM_FR_DATE;
	private String FORM_END_DATE;
	private String GOODS_ID;
	private String GOODS_NAME;
	private String PRC;
	private String MPRC;
	private String FOCUS;
	private String THUM;

	public String getTHUM() {
		return THUM;
	}

	public void setTHUM(String tHUM) {
		THUM = tHUM;
	}

	public String getFOCUS() {
		return FOCUS;
	}

	public void setFOCUS(String fOCUS) {
		FOCUS = fOCUS;
	}

	// 直播状态
	private byte LivingState = -2;
	// 是否需要直播提醒
	private boolean isNotify;

	private byte biType = 0;

	public byte getBiType() {
		return biType;
	}

	public void setBiType(byte biType) {
		this.biType = biType;
	}

	public boolean isNotify() {
		return isNotify;
	}

	public void setNotify(boolean isNotify) {
		this.isNotify = isNotify;
	}

	public byte getLivingState() {
		return LivingState;
	}

	public void setLivingState(byte livingState) {
		LivingState = livingState;
	}

	public String getLivingMessage() {
		switch (LivingState) {
		case -1:
			return " 等待直播";
		case 0:
			return "正在直播";
		case 1:
			return "直播完毕";
		case -2:
			return "等待直播";
		default:
			return "错误";
		}
	}

	public String getFORM_ID() {
		return FORM_ID;
	}

	public void setFORM_ID(String fORM_ID) {
		FORM_ID = fORM_ID;
	}

	public String getFORM_FR_DATE() {
		return FORM_FR_DATE;
	}

	public void setFORM_FR_DATE(String fORM_FR_DATE) {
		FORM_FR_DATE = fORM_FR_DATE;
	}

	public String getFORM_END_DATE() {
		return FORM_END_DATE;
	}

	public void setFORM_END_DATE(String fORM_END_DATE) {
		FORM_END_DATE = fORM_END_DATE;
	}

	public String getGOODS_ID() {
		return GOODS_ID;
	}

	public void setGOODS_ID(String gOODS_ID) {
		GOODS_ID = gOODS_ID;
	}

	public String getGOODS_NAME() {
		return GOODS_NAME;
	}

	public void setGOODS_NAME(String gOODS_NAME) {
		GOODS_NAME = gOODS_NAME;
	}

	public String getPRC() {
		return PRC;
	}

	public void setPRC(String pRC) {
		PRC = pRC;
	}

	public String getMPRC() {
		return MPRC;
	}

	public void setMPRC(String mPRC) {
		MPRC = mPRC;
	}

	@Override
	public String toString() {
		return "GOODS_ID:" + GOODS_ID + ",Notify:"+isNotify;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((GOODS_ID == null) ? 0 : GOODS_ID.hashCode());
		result = prime * result + (isNotify ? 1231 : 1237);
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		EpgBean other = (EpgBean) obj;
		if (GOODS_ID == null) {
			if (other.GOODS_ID != null)
				return false;
		} else if (!GOODS_ID.equals(other.GOODS_ID))
			return false;
		if (isNotify != other.isNotify)
			return false;
		return true;
	}

	@Override
	public int compareTo(EpgBean another) {
		return DateUtil.CompareTime1(this.getFORM_FR_DATE(),
				another.getFORM_FR_DATE());
	}
}